package com.aosan.website.admin.controller

import com.aosan.website.admin.entity.SysLoginLogEntity
import com.aosan.website.admin.service.LoginLogService
import com.aosan.website.common.core.utils.ResultData
import com.aosan.website.common.security.annotation.InnerApi
import org.springframework.web.bind.annotation.PostMapping
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RestController

@RestController
@RequestMapping("/log/login")
class LoginLogController(
        val loginLogService: LoginLogService
) {

    @InnerApi
    @PostMapping("/save")
    fun saveLoginLog(loginLogEntity: SysLoginLogEntity): Any {
        loginLogService.save(loginLogEntity)
        return ResultData.ok("")
    }
}